package com.ys.fmms.exception;

import com.ys.fmms.util.ResultCodeEnum;

public class LoginException extends RuntimeException {

    private String message;
    private Integer code;

    public LoginException(Integer code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public LoginException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
    }
}
